package com.py.credit.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.py.credit.dao.DataCleanDao;
import com.py.credit.service.DataCleanService;
import com.py.credit.utils.SQLBuilder;
import com.py.framework.core.common.Page;

@Service
public class DataCleanServiceImpl implements DataCleanService {

	@Autowired
	private DataCleanDao dataCleanDao;

	@Override
	public List<Map<String, Object>> getByConditionForPage(List<String> columns, String[] additionalColumns,
			String conditionStr, Page page) {
		List<String> conditions = SQLBuilder.createConditionSql(conditionStr);
		List<Map<String, Object>> batchLogs = dataCleanDao.selectByConditionForPage(columns, additionalColumns,
				conditions, page);

		return batchLogs;
	}

	@Override
	public Object getDetail(String channelId) {
		// TODO Auto-generated method stub
		return dataCleanDao.getDetail(channelId);
	}

	@Override
	public List getRecentMonthTime(String time) {
		// TODO Auto-generated method stub
		return dataCleanDao.getRecentMonthTime(time);
	}

}
